//跨浏览器获取视口大小
function getInner(){
    if(typeof window.innerWidth != 'undefined'){
        return {
            width: window.innerWidth,
            height: window.innerHeight
        }
    }else{
        return{
            width: document.documentElement.clientWidth,
            height: document.documentElement.clientHeight
        }
    }
}

//跨浏览器获取style
function getStyle(elements,attr){
        if(typeof window.getComputedStyle != 'undefined'){
            //w3c
            return window.getComputedStyle(elements,null)[attr];
        }else if(typeof elements.currentStyle != 'undefined'){
            return elements.currentStyle[attr];
        }
}
//判断class是否存在
function hasClass(){
}
//取消默认行为
function preDef(event){
    var e = getEvent(e);
    if(typeof e.preventDefault != 'undefined'){
        e.preventDefault();
    }else{
        e.returnValue = false;
    }
}
//
function getEvent(event){
    return event || window.event;
}